package com.btrace;

import com.sun.btrace.AnyType;
import com.sun.btrace.BTraceUtils;
import com.sun.btrace.annotations.*;

import java.lang.reflect.Field;
@BTrace
public class BtraceApollo {

    //@OnMethod(clazz = "com.ctrip.framework.apollo.biz.config.BizConfig", method = "/.*/", location = @Location(Kind.ENTRY))
    /*public static void config(@ProbeClassName String pcm, @ProbeMethodName String pmn, AnyType[] args){
        BTraceUtils.println("any config...");
        BTraceUtils.printArray(args);
        BTraceUtils.println(pcm+","+pmn);
        BTraceUtils.println();
    }*/

    @OnMethod(clazz = "com.btrace.BtraceStudy", method = "readHong", location = @Location(Kind.ENTRY))
    public static void getValue(@ProbeClassName String pcm, @ProbeMethodName String pmn, AnyType[] args, @Return Object retVal){
//        BTraceUtils.println("RefreshableConfig getValue...");
        BTraceUtils.printArray(args);
        BTraceUtils.println(pcm+","+pmn);
        BTraceUtils.println(BTraceUtils.str(retVal));
        BTraceUtils.println();
    }
}